package until

import "github.com/spf13/viper"

type Configs struct {
	Path string
}

func (c *Configs) SetConfig() *viper.Viper {
	v := viper.New()
	v.SetConfigName("config")
	v.SetConfigType("yaml")
	v.AddConfigPath(c.Path)
	err := v.ReadInConfig()
	if err != nil {
		panic(err.Error())
	}
	return v

}
